package com.project.psc.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@TableName("t_goodsInfo")
@Data
public class GoodsInfoBean {
    /**
     * 商品详情id
     */
    @TableId(value = "pk_id", type = IdType.AUTO)
    private Long id;

    /**
     * 库存id
     */
    @TableField("fk_storeId")
    private Long storeId;
    /**
     * 数量
     */
    @TableField("gi_num")
    private Integer num;
    /**
     * 价格
     */
    @TableField("gi_price")
    private Double price;
    /**
     * 颜色
     */
    @TableField("gi_color")
    private String color;

    /**
     * 大小
     */
    @TableField("gi_size")
    private String size;

    /**
     * 库存商品
     */
    @TableField(exist = false)
    private StoreBean store;

    public GoodsInfoBean(Long storeId, Integer num, Double price, String color, String size) {
        this.storeId = storeId;
        this.num = num;
        this.price = price;
        this.color = color;
        this.size = size;
    }
}
